:- use_module(library(random)).
:-use_module(library(samsort)).
/*
quick sort
         quicksort(L,V1,V2) :-
        V1 < V2,
       random(V1, V2, Pivot),
       partish(L,V1,V2,Pivot),
       Pivot1 is Pivot -1 ,
       Pivot2 is Pivot +1 ,
       quicksort(L,V1, Pivot1),
       quicksort(L,V1, Pivot2).


 partish(L,V1,V2,Pivot):-

*/

test:- L = [6,1,8],write(L), samsort(t,L,R),write(R).

t(A,B) :- A < B.

               
       